package com.bingxue.edu.framework.exception;


import com.bingxue.edu.framework.common.constant.HttpStatus;

/**
 * 认证异常
 *
 * @author panbo
 * @since 2024/6/26
 */
public class AuthException extends ErrorCodeException {

    @Override
    public int getStatusCode() {
        return HttpStatus.UNAUTHORIZED.getCode();
    }

    @Override
    public String getErrorMessage() {
        return CommonErrorCode.REQUEST_UNAUTHENTICATED.getMessage();
    }

    public AuthException() {
        super(CommonErrorCode.REQUEST_UNAUTHENTICATED);
    }

    public AuthException(String message) {
        super(CommonErrorCode.REQUEST_UNAUTHENTICATED, message);
    }
}
